<?php
// this view is pretty much a form, where the input will be saved as an update,
// to an existing user.

echo heading("Profile edit: ".$this->session->userdata('firstname'),2);

$attributes = array('id' => 'profileForm');
echo form_open_multipart('socialbuddy/update_profile', $attributes);

$properties = array(
    'src' => 'users/get_photo/' . $id,
    'width' => '120',
    'height' => '110'
);
echo img($properties,TRUE);
echo br();

echo form_label("Change your profile image", 'photo');
echo form_hidden("MAX_FILE_SIZE", '80000');
echo "<input type='file' name='photo' id='photo' size='20' /><br />";

echo br(2);

echo form_label('Your username: ', 'username') ;
echo "<b>" . $username . "</b><br />";

echo br();

echo form_label('first name:', 'firstname');
$input = array('name' => 'firstname', 'id' => 'firstname', 'size' => 40, 'value' => $firstname);
echo form_input($input);

echo form_label('last name:', 'lastname');
$input = array('name' => 'lastname', 'id' => 'lastname', 'size' => 40, 'value' => $lastname);
echo form_input($input);

echo form_label('email address:', 'email');
$input = array('name' => 'email', 'id' => 'email', 'size' => 40, 'value' => $email);
echo form_input($input);

echo form_label('phone:', 'phone');
$input = array('name' => 'phone', 'id' => 'phone', 'size' => 40, 'valie' => $phone);
echo form_input($input);

echo form_label('choose a new password:', 'password');
$input = array('name' => 'password', 'id' => 'password', 'size' => 20);
echo form_input($input);

echo form_label('confirm password:', 'confirm');
$input = array('name' => 'confirm', 'id' => 'confirm', 'size' => 20);
echo form_input($input);

echo form_label('short bio:', 'bio');
$input = array('name' => 'bio', 'id' => 'bio', 'rows' => 10, 'cols' => 35, 'value' => $bio);
echo "<br/>";
echo form_textarea($input);


echo br(2);
echo form_submit('update', 'update');

echo form_close();

?>



